<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>File: dfcext.rb</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



  <div id="fileHeader">
    <h1>dfcext.rb</h1>
    <table class="header-table">
    <tr class="top-aligned-row">
      <td><strong>Path:</strong></td>
      <td>dfcext.rb
      </td>
    </tr>
    <tr class="top-aligned-row">
      <td><strong>Last Update:</strong></td>
      <td>Wed Oct 01 22:08:44 -0600 2008</td>
    </tr>
    </table>
  </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <pre>
  dfcext = &quot;DFC extension&quot;
  is a lightweight wrapper to make DFC method calls a little easier on the developer
  Currently the following interfaces are extended:
  -- IDfTime
  -- IDfCollection
  -- IDfTypedObject
  -- IDfSession
  -- even base String class has one method to easy convert string to DfID objects
</pre>
<p>
NOTE:
</p>
<pre>
  The dfc classpath is loaded using a &quot;dfc_cp.yaml&quot; file that should sit in the same directory as the &quot;dfcext.rb&quot;
</pre>
<p>
TODO:
</p>
<ol>
<li>read dfc.jar using yaml - done

</li>
<li>sess can get a read query

</li>
<li>sess can get a query in arrary format? need to set limit?

</li>
<li>do easy session transaction - did one but need to make it more robust.

</li>
<li>any other ideas?

</li>
<li>easly retreive text content?

</li>
</ol>

    </div>

    <div id="requires-list">
      <h3 class="section-bar">Required files</h3>

      <div class="name-list">
      yaml&nbsp;&nbsp;
      </div>
    </div>

   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000002">&lt;</a>&nbsp;&nbsp;
      <a href="#M000001">==</a>&nbsp;&nbsp;
      <a href="#M000003">&gt;</a>&nbsp;&nbsp;
      <a href="#M000004">each_row</a>&nbsp;&nbsp;
      <a href="#M000007">easy_transaction</a>&nbsp;&nbsp;
      <a href="#M000005">method_missing</a>&nbsp;&nbsp;
      <a href="#M000006">replaceRepeating</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">AttrTypeRef</td>
          <td>=</td>
          <td class="context-item-value">{}</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000002" class="method-detail">
        <a name="M000002"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000002.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000002.html');return false;">
          <span class="method-name">&lt;</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
this method extends the <b>IDfTime</b> interface to do time comparision
using the &quot;&lt;&quot; so obj1 &lt; obj2 means that obj1 is an earlier
time than obj2
</p>
        </div>
      </div>

      <div id="method-M000001" class="method-detail">
        <a name="M000001"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000001.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000001.html');return false;">
          <span class="method-name">==</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
this method extends the <b>IDfTime</b> interface to do time comparision
using the &quot;==&quot; rather than using the compareTo method call
</p>
        </div>
      </div>

      <div id="method-M000003" class="method-detail">
        <a name="M000003"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000003.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000003.html');return false;">
          <span class="method-name">&gt;</span><span class="method-args">(obj)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
this method extends the <b>IDfTime</b> interface to do time comparision
using the &quot;&gt;&quot; so obj1 &lt; obj2 means that obj1 is a older
time than obj2
</p>
        </div>
      </div>

      <div id="method-M000004" class="method-detail">
        <a name="M000004"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000004.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000004.html');return false;">
          <span class="method-name">each_row</span><span class="method-args">() {|self.getTypedObject| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
this method extends the <b>IDfCollection</b> interface so that the
developer can easily get the results especially in a query situation using
a similar <b>each</b> style on each result row
</p>
        </div>
      </div>

      <div id="method-M000007" class="method-detail">
        <a name="M000007"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000007.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000007.html');return false;">
          <span class="method-name">easy_transaction</span><span class="method-args">() {|| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
extends the <b>IDfSession</b> interface to have a easy way to do
transaction
</p>
        </div>
      </div>

      <div id="method-M000005" class="method-detail">
        <a name="M000005"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000005.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000005.html');return false;">
          <span class="method-name">method_missing</span><span class="method-args">(sym, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
the method missing if for the <b>IDfTypedObject</b> so that the developer
can easily read and write attributes. currently one problem is with common
attributes like Title, Subject, Keywords, Authors, you cannot use this
magic however it will work if the custom types like a sub-class of
dm_document e.g. abc_doc has a single string attribute like mytitle can
easily do the following:
</p>
<pre>
  1. reading: abc_doc.mytitle
  2. writing: abc_doc.mytitle = &quot;hellow world&quot;
</pre>
<p>
for repeating attributes a read will return an array while if you want to
write then pass in an array
</p>
        </div>
      </div>

      <div id="method-M000006" class="method-detail">
        <a name="M000006"></a>

        <div class="method-heading">
          <a href="dfcext_rb.src/M000006.html" target="Code" class="method-signature"
            onclick="popupCode('dfcext_rb.src/M000006.html');return false;">
          <span class="method-name">replaceRepeating</span><span class="method-args">( attributeName, valuesArray)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>